home *** CD-ROM | disk | FTP | other *** search
- //----------------------------------------------------------------------------
- // PGTray95.hpp - bcbdcc32 generated hdr (DO NOT EDIT) rev: 0
- // From: PGTray95.pas
- //----------------------------------------------------------------------------
- #ifndef PGTray95HPP
- #define PGTray95HPP
- //----------------------------------------------------------------------------
- #include <PGAppWnd.hpp>
- #include <Menus.hpp>
- #include <ShellAPI.hpp>
- #include <IniFiles.hpp>
- #include <Dialogs.hpp>
- #include <ExtCtrls.hpp>
- #include <Forms.hpp>
- #include <Controls.hpp>
- #include <Graphics.hpp>
- #include <Classes.hpp>
- #include <Messages.hpp>
- #include <Windows.hpp>
- #include <SysUtils.hpp>
- #include <System.hpp>
- namespace Pgtray95
- {
- //-- type declarations -------------------------------------------------------
- enum TPGTrayIconAnimationOptions { aoIconsInExe, aoIconsAreFiles };
-
- class __declspec(delphiclass) TPGTrayIconAnimation;
- class __declspec(delphiclass) TPGTimerItem;
- class __declspec(delphiclass) TPGTimerManager;
- typedef int TPGTimerInterval;
-
- class __declspec(pascalimplementation) TPGTimerManager : public Classes::TComponent
- {
- typedef Classes::TComponent inherited;
-
- protected:
- bool FEnabled;
- Classes::TList* TimerItems;
- void __fastcall SetEnabled(bool p0);
- void __fastcall DoTimeouts(System::TObject* p0);
-
- public:
- Extctrls::TTimer* Timer;
- __fastcall virtual TPGTimerManager(Classes::TComponent* p0);
- __fastcall virtual ~TPGTimerManager(void);
- TPGTimerItem* __fastcall AddTimer(bool p0, TPGTimerInterval p1, Classes::TNotifyEvent p2);
- void __fastcall DeleteTimer(int p0);
- TPGTimerItem* __fastcall Timers(int p0);
- int __fastcall TimerCount(void);
- void __fastcall RefreshInterval(void);
-
- __published:
- __property bool Enabled = {read=FEnabled, write=SetEnabled, nodefault};
- };
-
- class __declspec(pascalimplementation) TPGTimerItem : public Classes::TComponent
- {
- typedef Classes::TComponent inherited;
-
- protected:
- TPGTimerManager* TimerManager;
- TPGTimerInterval FInterval;
- bool FEnabled;
- Classes::TNotifyEvent OnTimer;
- void __fastcall SetEnabled(bool p0);
- void __fastcall SetInterval(TPGTimerInterval p0);
-
- public:
- double LastTickCount;
- long Tag;
- __fastcall virtual TPGTimerItem(Classes::TComponent* p0);
- bool __fastcall ShouldTimeout(void);
- void __fastcall TimeOut(void);
-
- __published:
- __property bool Enabled = {read=FEnabled, write=SetEnabled, nodefault};
- __property TPGTimerInterval Interval = {read=FInterval, write=SetInterval, nodefault};
- public:
- /* TComponent.Destroy */ __fastcall virtual ~TPGTimerItem(void) { }
-
- };
-
- class __declspec(delphiclass) TPGTrayIcon95;
- enum TPGTrayIconState { tsEnabled, tsDisabled, tsAnimated };
-
- enum TPGTrayIconOption { toMinimizeToTray, toUnclutterDelphi1TaskBar };
-
- typedef Set<TPGTrayIconOption, toMinimizeToTray, toUnclutterDelphi1TaskBar> TPGTrayIconOptions;
-
- typedef void __fastcall (__closure *TPGTrayIconStateChangingEvent)(System::TObject* Sender, TPGTrayIconState
- &NewState);
-
- struct PGNOTIFYICONDATA
- {
- long cbSize;
- long Wnd;
- long uID;
- long uFlags;
- long uCallbackMessage;
- long hIcon;
- char szTip[64];
- } ;
-
- class __declspec(delphiclass) TPGTrayIconMsgWindow;
- class __declspec(pascalimplementation) TPGTrayIconMsgWindow : public Classes::TComponent
- {
- typedef Classes::TComponent inherited;
-
- protected:
- TMouseButton ClickedMouseButton;
- TPGTrayIcon95* TrayIcon;
- bool DoubleClickHasOccurred;
- TPGTimerItem* WaitForClickEventTimer;
- TPGTimerItem* MouseMoveTimer;
- tagPOINT ptMousePosition;
- bool AlreadyFiredMouseEnterEvent;
- bool HitTrayIcon;
- MESSAGE void __fastcall TrayIconCallback(Messages::TMessage &PGTray95_);
- void __fastcall StartWaitingForDoubleClick(void);
- void __fastcall DoClickEventAsynchronously(TPGTimerInterval p0);
- void __fastcall DoneWaitingForDoubleClick(System::TObject* p0);
- void __fastcall StartTrackingMouseMovement(const tagPOINT &PGTray95_);
- void __fastcall StopTrackingMouseMovement(void);
- void __fastcall TrackMouseMovement(System::TObject* p0);
-
- public:
- __fastcall virtual TPGTrayIconMsgWindow(Classes::TComponent* p0);
- __fastcall virtual ~TPGTrayIconMsgWindow(void);
- };
-
- class __declspec(pascalimplementation) TPGTrayIcon95 : public Classes::TComponent
- {
- typedef Classes::TComponent inherited;
-
- protected:
- TPGTrayIconAnimation* FAnimation;
- bool FActive;
- bool FAutoPopup;
- Graphics::TIcon* FDisabledIcon;
- Forms::TForm* FForm;
- int FHandle;
- System::AnsiString FHint;
- Graphics::TIcon* FIcon;
- TPGTrayIconState FState;
- TPGTrayIconOptions FOptions;
- Classes::TNotifyEvent FOnAnimation;
- Classes::TNotifyEvent FOnClick;
- Classes::TNotifyEvent FOnDblClick;
- Controls::TMouseMoveEvent FOnMouseMove;
- Controls::TMouseMoveEvent FOnMouseEnter;
- Controls::TMouseMoveEvent FOnMouseExit;
- TPGTrayIconStateChangingEvent FOnStateChanging;
- Classes::TNotifyEvent FOnAppMinimize;
- Classes::TNotifyEvent FOnAppRestore;
- Menus::TPopupMenu* FPopupMenu;
- bool FShowHint;
- Graphics::TIcon* CurrentIcon;
- PGNOTIFYICONDATA tnd;
- Classes::TNotifyEvent PostedEvent;
- System::AnsiString __fastcall GetHint(void);
- int __fastcall GetHandle(void);
- Controls::TMouseButton __fastcall GetClickedMouseButton(void);
- void __fastcall SetActive(bool p0);
- void __fastcall SetDisabledIcon(Graphics::TIcon* p0);
- void __fastcall SetHint( System::AnsiString p0);
- void __fastcall SetIcon(Graphics::TIcon* p0);
- void __fastcall SetOptions(TPGTrayIconOptions p0);
- void __fastcall SetShowHint(bool p0);
- void __fastcall SetState(TPGTrayIconState p0);
- void __fastcall FireEvent(Classes::TNotifyEvent p0);
- void __fastcall IconChanged(System::TObject* p0);
- void __fastcall LoadAnimationIcon(const int p0);
- void __fastcall LoadCurrentIcon(void);
- virtual void __fastcall Loaded(void);
- void __fastcall ApplicationMinimize(System::TObject* p0);
- void __fastcall ApplicationRestore(System::TObject* p0);
- long __fastcall HIcon32(void);
-
- public:
- TPGTrayIconMsgWindow* MessageWindow;
- TPGTimerManager* TimerManager;
- __fastcall virtual TPGTrayIcon95(Classes::TComponent* p0);
- __fastcall virtual ~TPGTrayIcon95(void);
- void __fastcall ShowIcon(void);
- void __fastcall HideIcon(void);
- virtual void __fastcall ShowApplication(void);
- virtual void __fastcall HideApplication(void);
- void __fastcall DoShowApplication(System::TObject* p0);
- void __fastcall DoHideApplication(System::TObject* p0);
- void __fastcall Refresh(void);
- void __fastcall ShowPopupAtCursor(void);
- void __fastcall NotifyShell(long p0);
- void __fastcall PostEvent(Classes::TNotifyEvent p0);
- bool __fastcall ShouldDisplayPopup(void);
- bool __fastcall ShouldDoMouseMove(void);
- bool __fastcall ShouldDoMouseEnterOrMouseExit(void);
- virtual void __fastcall LockScreenUpdates(bool p0);
- __property Controls::TMouseButton ClickedMouseButton = {read=GetClickedMouseButton, nodefault};
- __property int Handle = {read=GetHandle, nodefault};
- __property Forms::TForm* Form = {read=FForm, nodefault};
-
- __published:
- __property Graphics::TIcon* Icon = {read=FIcon, write=SetIcon, nodefault};
- __property Graphics::TIcon* DisabledIcon = {read=FDisabledIcon, write=SetDisabledIcon, nodefault};
- __property TPGTrayIconAnimation* Animation = {read=FAnimation, write=FAnimation, nodefault};
- __property bool Active = {read=FActive, write=SetActive, default=0};
- __property bool AutoPopup = {read=FAutoPopup, write=FAutoPopup, default=0};
- __property System::AnsiString Hint = {read=FHint, write=SetHint, nodefault};
- __property Classes::TNotifyEvent OnAnimation = {read=FOnAnimation, write=FOnAnimation};
- __property Classes::TNotifyEvent OnAppMinimize = {read=FOnAppMinimize, write=FOnAppMinimize};
- __property Classes::TNotifyEvent OnAppRestore = {read=FOnAppRestore, write=FOnAppRestore};
- __property Classes::TNotifyEvent OnClick = {read=FOnClick, write=FOnClick};
- __property Classes::TNotifyEvent OnDblClick = {read=FOnDblClick, write=FOnDblClick};
- __property Controls::TMouseMoveEvent OnMouseMove = {read=FOnMouseMove, write=FOnMouseMove};
- __property Controls::TMouseMoveEvent OnMouseEnter = {read=FOnMouseEnter, write=FOnMouseEnter};
- __property Controls::TMouseMoveEvent OnMouseExit = {read=FOnMouseExit, write=FOnMouseExit};
- __property TPGTrayIconStateChangingEvent OnStateChanging = {read=FOnStateChanging, write=FOnStateChanging
- };
- __property TPGTrayIconOptions Options = {read=FOptions, write=SetOptions, default=3};
- __property Menus::TPopupMenu* PopupMenu = {read=FPopupMenu, write=FPopupMenu, nodefault};
- __property bool ShowHint = {read=FShowHint, write=SetShowHint, default=1};
- __property TPGTrayIconState State = {read=FState, write=SetState, default=0};
- };
-
- class __declspec(pascalimplementation) TPGTrayIconAnimation : public Classes::TPersistent
- {
- typedef Classes::TPersistent inherited;
-
- protected:
- TPGTimerItem* AnimationTimer;
- TPGTrayIcon95* TrayIcon;
- int FIconIndex;
- int FInterval;
- Classes::TStringList* FIcons;
- TPGTrayIconAnimationOptions FOptions;
- void __fastcall SetInterval(int p0);
- void __fastcall SetIcons(Classes::TStringList* p0);
- void __fastcall StartAnimation(void);
- void __fastcall StopAnimation(void);
- void __fastcall AnimationEvent(System::TObject* p0);
-
- public:
- __property int IconIndex = {read=FIconIndex, nodefault};
-
- __published:
- __property int Interval = {read=FInterval, write=SetInterval, default=1000};
- __property Classes::TStringList* Icons = {read=FIcons, write=SetIcons, nodefault};
- __property TPGTrayIconAnimationOptions Options = {read=FOptions, write=FOptions, default=1};
- public:
-
- /* TObject.Create */ __fastcall TPGTrayIconAnimation(void) : Classes::TPersistent() { }
- /* TObject.Destroy */ __fastcall virtual ~TPGTrayIconAnimation(void) { }
-
- };
-
- typedef PGNOTIFYICONDATA *PPGNOTIFYICONDATA;
-
- //-- var, const, procedure ---------------------------------------------------
- #define WM_TRAY_CALLBACK (Word)(1124)
- #define WM_PGPOSTEVENT (Word)(1125)
- #define TRAY_ICON_ID (Byte)(42)
- #define PGNIM_ADD (Byte)(0)
- #define PGNIM_MODIFY (Byte)(1)
- #define PGNIM_DELETE (Byte)(2)
- #define PGNIF_MESSAGE (Byte)(1)
- #define PGNIF_ICON (Byte)(2)
- #define PGNIF_TIP (Byte)(4)
- #define NID_MAXTIP (Byte)(63)
- #define Animation_Interval (Word)(1000)
- extern TPGTimerInterval PGTrayIconDoubleClickTime;
- extern void __fastcall Register(void);
- extern Classes::TShiftState __fastcall PGShiftState(void);
- extern void __fastcall RunTrayApplication(void);
- //-- template instantiations -------------------------------------------------
- template class TPGTrayIconOptions ;
-
- } /* namespace Pgtray95 */
- #if !defined(NO_IMPLICIT_NAMESPACE_USE)
- using namespace Pgtray95;
- #endif
- //-- end unit ----------------------------------------------------------------
- #endif // PGTray95
-